package com.jerry.netty;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.jerry.netty.StandardServlet;
import com.jerry.netty.http.JerryReponse;
import com.jerry.netty.http.JerryRequest;

/**
 * Created by jerry on 2016/12/17.
 */
public class SecondServlet extends StandardServlet {

    @Override
    public void doGet(JerryRequest request, JerryReponse reponse) {

        doPost(request,reponse);
    }

    @Override
    public void doPost(JerryRequest request, JerryReponse reponse) {
//         String param =  JSONObject.toJSONString(request.getParamters(),true);
        String param  = JSON.toJSONString(request.getParamters(),true);
        reponse.write(param,200);
    }
}
